package fr.vahren.dotastrat.game;

import org.json.simple.JSONObject;

/**
 * @author fdroumag
 *
 */
public class D2SMessage {

	private String text;

	private D2SMessageType type;

	public D2SMessage(String text, D2SMessageType type) {
		super();
		this.text = text;
		this.type = type;
	}

	@Override
	public String toString() {
		return "D2SMessage [text=" + text + ", type=" + type + "]";
	}

	public JSONObject generateInfo() {
		JSONObject res = new JSONObject();
		res.put("text", text);
		res.put("type", type.toString());
		return res;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public D2SMessageType getType() {
		return type;
	}

	public void setType(D2SMessageType type) {
		this.type = type;
	}
	
	

}
